#ifndef __SCENE_H_
#define __SCENE_H_

#include "Player.h"
#include "Global.h"
#include "Monster.h"
#include "Shop.h"
#include "Treasure.h"
class Scene
{
public:
    //Scene(int width, int height, Player &p);
    virtual void show()=0;
    
    //战斗相关函数
    //判断是否在同一位置
    virtual Monster* IsInSamePlace()=0;

    //判断进入商店
    virtual void BuyInShop()=0;
    virtual void FindTreasure()=0;
    virtual std:: vector<Monster> *getMonsters()=0;
    virtual std:: vector<Treasure> *getTreasures()=0;

//protected:
    Scene(int width, int height, Player &p);
    //地图底层
    std::vector<std::vector<std::string>> Map;
    //地图长宽
    int width;
    int height;
    Player &player;
    //怪兽列表
    std::vector<Monster> Monsters;
    //随机坐标容器
    std::vector<Point> RandPlaces;
    //宝藏列表
    std::vector<Treasure> Treasures;
    virtual void InitialMonsters()=0;
    //初始化随机容器(洗牌)
    virtual void InitRandContainer()=0;
    virtual Point GetRandomPlace()=0;
    virtual void InitTreasure()=0;
    //商店放在地图里面
    Shop shop;
    Treasure  treasure;
};

class Scene1:public Scene
{
    public:
    Scene1(int width, int height, Player &p);
    //战斗相关函数
    //判断是否在同一位置
    Monster* IsInSamePlace();
    Scene1& operator=(const Scene&s);
    void show();
    //判断进入商店
    void BuyInShop();
    void FindTreasure();
    void InitTreasure();
    void InitRandContainer();
    void InitialMonsters();
    Point GetRandomPlace();
    std:: vector<Monster> *getMonsters();
    std:: vector<Treasure> *getTreasures();
};
class Scene2:public Scene
{
public:
    Scene2(int width, int height, Player &p);
    //战斗相关函数
    //判断是否在同一位置
     Monster* IsInSamePlace();
     Scene2& operator=(const Scene&s);
    void show();
    //判断进入商店
    void BuyInShop();
    void FindTreasure();
    void InitTreasure();
    void InitRandContainer();
    void InitialMonsters();
    Point GetRandomPlace();
    std:: vector<Monster> *getMonsters();
    std:: vector<Treasure> *getTreasures();
};
class Scene3:public Scene
{
public:
    Scene3(int width, int height, Player &p);
    //战斗相关函数
    //判断是否在同一位置
     Monster* IsInSamePlace();
    Scene3& operator=(const Scene&s);
    void show();
    //判断进入商店
    void BuyInShop();
    void FindTreasure();
    void InitTreasure();
    void InitRandContainer();
    void InitialMonsters();
    Point GetRandomPlace();
    std:: vector<Monster> *getMonsters();
    std:: vector<Treasure> *getTreasures();   
};


//进入战斗
void Battle(Player& p, Monster& m);
void BattleInterFace(Player& p, Monster& m);


#endif